home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Example Tools / Sources / TTimeSchedulerExample.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-19  |  1.3 KB  |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TTimeSchedulerExample.h
  3.  
  4.     Contains:    Declaration for TAlert, a TOperation subclass. TOperation objects
  5.                 contain the implementation of the task to be performed. This operation
  6.                 is placed on TTimeScheduler to be performed after a certain amount of
  7.                 time passes. TAlert's operation is to sound two beeps to informing the
  8.                 user that it has fired.
  9.  
  10.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  11.  
  12. */
  13.  
  14. #ifndef __TTASKSCHEDULEREXAMPLE__
  15. #define __TTASKSCHEDULEREXAMPLE__
  16.  
  17. #ifndef __OSUTILS__
  18. #include <osutils.h>
  19. #endif
  20.  
  21. ///————————————————————————————————————————————————————————————————————————————————————
  22. ///    TAlert
  23. ///————————————————————————————————————————————————————————————————————————————————————
  24.  
  25. class TAlert : public TOperation {
  26.     public:
  27.                         TAlert();        // Constructor
  28.         virtual            ~TAlert();        // Destructor
  29.         virtual void    Process();        // Override
  30.                 Boolean    GetDone() { return fDone; };
  31.     private:
  32.         Boolean fDone;
  33. };
  34.  
  35. ///————————————————————————————————————————————————————————————————————————————————————
  36. ///    TAlert IMPLEMENTATION
  37. ///————————————————————————————————————————————————————————————————————————————————————
  38.  
  39.     TAlert::TAlert()
  40.     {
  41.         fDone = false;
  42.     }
  43.  
  44.     TAlert::~TAlert()
  45.     {
  46.     }
  47.  
  48.     void TAlert::Process()
  49.     {
  50.         fDone = true;
  51.     }
  52.  
  53. #endif